package com.BlogPark.service.SearchService.Impl;

import com.BlogPark.mapper.SearchArticleMapper;
import com.BlogPark.pojo.Article;
import com.BlogPark.service.SearchService.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: 业峰
 * @Date: 2022/8/10 - 08 - 10 - 21:48
 * @version: 1.0
 */
@Service
public class SearchServiceImpl implements SearchService {
    @Autowired
    private SearchArticleMapper searchArticleMapper;

    @Override
    public Article searchById(String id) {
        Article article = searchArticleMapper.selectById(id);
        return article;
    }

    @Override
    public List<Article> SearchByEntry(String entry) {
        List<Article> articles = searchArticleMapper.selectByEntry(entry);
        return articles;
    }

    @Override
    public List<Article> showAll() {
        List<Article> articles = searchArticleMapper.showAll();
        return articles;
    }
}
